var express = require('express');
var router = express.Router();
var Post = require('../models/posts.js');
var check = require('./check');
var checkLogin = check['checkLogin'];
var checkNotLogin = check['checkNotLogin'];

router.post('/',checkLogin);
router.post('/',function(req,res,next){
    var articleId = req.body['articleId'];
    Post.delete(articleId,function(err){
        if(err){
            res.json({success:false});
        }else{
            res.json({success:true});
        }
    })
});

module.exports = router;